using System;

namespace Sedna.Core.Event
{
    public enum EventSource
    {
        MethodReturn,
        MethodParameter
    }
    
    [AttributeUsage(AttributeTargets.Method)]
    public class EventfulAttribute : Attribute
    {
        /// <summary>
        /// Name of an event
        /// </summary>
        private String name = String.Empty;
        private EventSource eventSource = EventSource.MethodParameter;
        
        public EventfulAttribute()
        {}

        public EventfulAttribute(String name)
        {
            this.name = name;
        }
        
        public EventfulAttribute(EventSource eventSource)
        {
            this.eventSource = eventSource;
        }

        public EventfulAttribute(String name, EventSource eventSource)
        {
            this.name = name;
            this.eventSource = eventSource;
        }
        
        public String Name
        {
            get { return name;}         
        }
        
        public EventSource EventSource
        {
            get { return eventSource;}
        }
    }
}
